package com.haogu.controller;

import com.haogu.pojo.Result;
import com.haogu.service.HomeCityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("homeCity")
public class HomeCityController {
    @Autowired
    private HomeCityService homeCityService;

    @GetMapping
    public Result search(String name){
        return Result.success(homeCityService.search(name));
    }
}
